import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import 'amfe-flexible'
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
import JavaScriptUtility from '@runtime/base/Utility/JavaScriptUtility';
import WindowLoader from '@runtime/base/Loader/WindowLoader';
import RouterComponent from '@runtime/module/Router/RouterComponent';
import DirectiveComponent from '@components/Apps/Simulation/Directive/DirectiveComponent';
import MessageDispatcherComponent from '@runtime/module/Dispatcher/MessageDispatcherComponent';
import router from "./router";


WindowLoader.Default.Initialize();
JavaScriptUtility.Default.Initialize();
MessageDispatcherComponent.Default.Register();

window.addEventListener('load', OnWindowLoad);

function OnWindowLoad(): void {
    const app = createApp(App);
    app.use(Antd);
    DirectiveComponent.Default.Register(app);
    // app.use(RouterComponent.Default.Router);
    app.use(router);

    app.mount('#app');
}